<?php

declare(strict_types=1);

namespace ImiApp\ApiServer\Api\Model\Base;

use Imi\Config\Annotation\ConfigValue;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Entity;
use Imi\Model\Annotation\Table;
use ImiApp\ImiServer\AbstractModel as Model;

/**
 * 品牌申请 基类.
 *
 * @Entity(camel=false, bean=true, incrUpdate=false)
 * @Table(name=@ConfigValue(name="@app.models.ImiApp\ApiServer\Api\Model\GoodsbrandApply.name", default="fa_goodsbrand_apply"), usePrefix=false, id={"id"}, dbPoolName=@ConfigValue(name="@app.models.ImiApp\ApiServer\Api\Model\GoodsbrandApply.poolName"))
 * @DDL(sql="CREATE TABLE `fa_goodsbrand_apply` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL COMMENT '品牌名',
  `images` text COMMENT '资质图',
  `store_id` int(10) unsigned DEFAULT NULL COMMENT '店铺id',
  `createtime` int(10) unsigned DEFAULT NULL COMMENT '上传时间',
  `ps` varchar(255) DEFAULT NULL COMMENT '拒绝理由',
  `status` enum('1','2','3') DEFAULT '1' COMMENT '状态:1=待审核,2=已通过,3=已拒绝',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='品牌申请'", decode="")
 *
 * @property int|null $id 
 * @property string|null $name 品牌名
 * @property string|null $images 资质图
 * @property int|null $storeId 店铺id
 * @property int|null $createtime 上传时间
 * @property string|null $ps 拒绝理由
 * @property string|null $status 状态:1=待审核,2=已通过,3=已拒绝
 */
abstract class GoodsbrandApplyBase extends Model
{
    /**
     * {@inheritdoc}
     */
    public const PRIMARY_KEY = 'id';

    /**
     * {@inheritdoc}
     */
    public const PRIMARY_KEYS = ["id"];

    /**
     * id.
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true, unsigned=true, virtual=false)
     * @var int|null
     */
    protected ?int $id = NULL;

    /**
     * 获取 id.
     *
     * @return int|null
     */
    public function getId(): ?int
    {
        return $this->id;
    }

    /**
     * 赋值 id.
     * @param int|null $id id
     * @return static
     */
    public function setId($id)
    {
        $this->id = null === $id ? null : (int)$id;
        return $this;
    }

    /**
     * 品牌名.
     * name
     * @Column(name="name", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $name = NULL;

    /**
     * 获取 name - 品牌名.
     *
     * @return string|null
     */
    public function getName(): ?string
    {
        return $this->name;
    }

    /**
     * 赋值 name - 品牌名.
     * @param string|null $name name
     * @return static
     */
    public function setName($name)
    {
        $this->name = null === $name ? null : (string)$name;
        return $this;
    }

    /**
     * 资质图.
     * images
     * @Column(name="images", type="text", length=0, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $images = NULL;

    /**
     * 获取 images - 资质图.
     *
     * @return string|null
     */
    public function getImages(): ?string
    {
        return $this->images;
    }

    /**
     * 赋值 images - 资质图.
     * @param string|null $images images
     * @return static
     */
    public function setImages($images)
    {
        $this->images = null === $images ? null : (string)$images;
        return $this;
    }

    /**
     * 店铺id.
     * store_id
     * @Column(name="store_id", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=true, virtual=false)
     * @var int|null
     */
    protected ?int $storeId = NULL;

    /**
     * 获取 storeId - 店铺id.
     *
     * @return int|null
     */
    public function getStoreId(): ?int
    {
        return $this->storeId;
    }

    /**
     * 赋值 storeId - 店铺id.
     * @param int|null $storeId store_id
     * @return static
     */
    public function setStoreId($storeId)
    {
        $this->storeId = null === $storeId ? null : (int)$storeId;
        return $this;
    }

    /**
     * 上传时间.
     * createtime
     * @Column(name="createtime", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=true, virtual=false)
     * @var int|null
     */
    protected ?int $createtime = NULL;

    /**
     * 获取 createtime - 上传时间.
     *
     * @return int|null
     */
    public function getCreatetime(): ?int
    {
        return $this->createtime;
    }

    /**
     * 赋值 createtime - 上传时间.
     * @param int|null $createtime createtime
     * @return static
     */
    public function setCreatetime($createtime)
    {
        $this->createtime = null === $createtime ? null : (int)$createtime;
        return $this;
    }

    /**
     * 拒绝理由.
     * ps
     * @Column(name="ps", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $ps = NULL;

    /**
     * 获取 ps - 拒绝理由.
     *
     * @return string|null
     */
    public function getPs(): ?string
    {
        return $this->ps;
    }

    /**
     * 赋值 ps - 拒绝理由.
     * @param string|null $ps ps
     * @return static
     */
    public function setPs($ps)
    {
        $this->ps = null === $ps ? null : (string)$ps;
        return $this;
    }

    /**
     * 状态:1=待审核,2=已通过,3=已拒绝.
     * status
     * @Column(name="status", type="enum", length=0, accuracy=0, nullable=true, default="1", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|null
     */
    protected ?string $status = '1';

    /**
     * 获取 status - 状态:1=待审核,2=已通过,3=已拒绝.
     *
     * @return string|null
     */
    public function getStatus(): ?string
    {
        return $this->status;
    }

    /**
     * 赋值 status - 状态:1=待审核,2=已通过,3=已拒绝.
     * @param string|null $status status
     * @return static
     */
    public function setStatus($status)
    {
        $this->status = null === $status ? null : (string)$status;
        return $this;
    }

}
